package com.zhai.boot.domain.in;

import com.zhai.boot.domain.in.base.GridIn;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * @package: com.zhai.boot.domain.in
 * @project-name: zhai-boot
 * @description: demo 查询 入参
 * @author: Created by 翟凤玺
 * @create-datetime: 2018-7-20 16:09
 */
@Data
public class DemoFindIn extends GridIn{

    @NotBlank(message = "姓名不能为空")
    @Size(min = 2, max = 6, message = "姓名长度在2-6位")
    @ApiModelProperty(value = "姓名", example ="小翟", required = true)
    private String name;

    @NotNull(message = "年龄不能为空")
    @Min(value = 1, message = "年龄不能小于1")
    @Max(value = 120, message = "年龄不能大于120")
    @ApiModelProperty(value = "年龄")
    private Integer age;
}
